#include "udp_serve.hpp"
#include <memory>

void usage(const char *command)
{
    std::cout << "\nUsage# " << command << " port\n" << std::endl; 
}

int main(int argc, const char **argv)
{
    if(argc != 2)
    {
        usage(argv[0]);
        exit(1);
    }

    uint16_t port = static_cast<uint16_t>(atoi(argv[1]));
    std::unique_ptr<Server> psvr(new Server(port));
    psvr->init();
    psvr->start();
    return 0;
}